{extend name='admin@public/content'}

{block name="content"}
<!-- 表单搜索 开始 -->
<form class="layui-form layui-form-pane form-search" action="{:request()->url()}" onsubmit="return false" method="get">

    <div class="layui-form-item layui-inline">
        <button class="layui-btn layui-btn-xs">上 周</button>
    </div>

    <div class="layui-form-item layui-inline">
        <button class="layui-btn layui-btn-xs layui-btn-normal">本 周</button>
    </div>

    <div class="layui-form-item layui-inline">
        <button class="layui-btn layui-btn-xs">下 周</button>
    </div>

</form>
<!-- 表单搜索 结束 -->

<form onsubmit="return false;" data-auto="" method="POST">
    <input type="hidden" value="resort" name="action">
    <table class="layui-table notevent" lay-skin="line">
        <thead>
        <tr>
            <th class='text-left w150'></th>
            <th class='text-left w150'>周一</th>
            <th class='text-left w150'>周二</th>
            <th class='text-left w150'>周三</th>
            <th class='text-left w150'>周四</th>
            <th class='text-left w150'>周五</th>
            <th class='text-left w150'>周六</th>
            <th class='text-left w150'>周日</th>
            <th class='text-center'>操作</th>
        </tr>
        </thead>
        <tbody>
        <tr>
            <th class='text-left w150'>日期</th>
            {foreach $week_date as $key=>$vo}
            {if condition="$vo == $today"}
            <td class='text-left' style="background-color: chartreuse">{$vo}</td>
            {else/}
            <td class='text-left'>{$vo}</td>
            {/if}
            {/foreach}
            <th class='text-center'></th>
        </tr>

        {foreach $morning as $key=>$morn}
        <tr>
            <th class='text-left w150'>上午</th>
            {foreach $morn as $key=>$vo}
            <td class='text-left'><input type="checkbox" name="week[]"/>{$vo.0}点</td>
            {/foreach}
            <th class='text-center'></th>
        </tr>
        {/foreach}

        <tr>
        <thead>
            <td colspan="9"></td>
        </thead>
        </tr>

        {foreach $afternoon as $key=>$noon}
        <tr>
            <th class='text-left w150'>下午</th>
            {foreach $noon as $key=>$vo}
            <td class='text-left'>
                <input type="checkbox" name="week[]"/>{$vo.0}点
            </td>
            {/foreach}
            <th class='text-center'></th>
        </tr>
        {/foreach}

        <tr>
            <thead>
            <td colspan="9"></td>
            </thead>
        </tr>

        {foreach $night as $key=>$n}
        <tr>
            <th class='text-left w150'>晚间</th>
            {foreach $n as $key=>$vo}
            <td class='text-left'><input type="checkbox" name="week[]"/>{$vo.0}点</td>
            {/foreach}
            <th class='text-center'></th>
        </tr>
        {/foreach}
        </tbody>
    </table>
</form>

<script>
    (function () {
        window.form.render();
    })();
</script>
{/block}